package com.sdsy.util;

import java.text.DecimalFormat;

public class CommTypeUtils {

    public static DecimalFormat CURRENCY_DF = new DecimalFormat("#0.000000"); //金额格式化
    public static DecimalFormat CURRENCY_FORMAT = new DecimalFormat("#0.0000"); //格式化四位小数

    public static String LOGIN_MEMBER = "MEMBER";


    /**
     * 总账户（多个）
     *
     * @author hp
     */
    public static class CENTER_ACCOUNT_TYPE {
        public static final String TOTAL_ACCOUNT = "total_account";  // 总账户
        public static final String DISBURES_ACCOUNT = "disbures_account";  // 支出账户
        public static final String REPO_ACCOUNT = "repo_account";  // 回购账户
        public static final String LOCK_ACCOUNT = "lock_account";  // 锁定账户
        public static final String FEE_ACCOUNT = "fee_account";  // 手续费账户
    }


    public static class CurrencyTypeUtil {
        public static final String YLL = "YLL"; //娱乐链
    }

    /**
     * 业务状态
     *
     * @author hp
     */
    public static class BIZ_STATUS {
        public static final Integer VIP_CENTER_ENABLE = 1; //用户中心已启用
        public static final Integer VIP_CENTER_DISABLE = 0; //用户中心已停用
    }

    /**
     * 转账手续费类型
     */
    public static class FEE_TYPE {
        public static final String FREE = "free";  // 自由转自由
        public static final String COMPUTE = "compute";  // 算力转算力
        public static final String FREE_TO_COMPUTE = "freeToCompute";  // 自由转算力
        public static final String COMPUTE_TO_FREE = "computeToFree"; // 算力转自由
    }

    /**
     * 账户类型
     */
    public static class ACCOUNT_TYPE {
        public static final String FREE_ACCOUNT = "free";  // 自由账户
        public static final String COMPUTE_ACCOUNT = "compute"; // 算力账户
        public static final String LOCK_ACCOUNT = "lock"; // 锁定账户
        public static final String STAT_ACCOUNT = "static"; //智能算力账户
        public static final String ACTIVE_ACCOUNT = "dynamic"; //分享算力账户
    }


    /**
     * 系统参数类型
     *
     * @author hp
     */
    public static class SYS_PARAM_TYPE {
        public static final String FREE_FREE_FEE = "free_free_fee";  //自由转自由手续费
        public static final String COMPUTE_COMPUTE_FEE = "compute_compute_fee";  //算力转算力手续费
        public static final String FREE_COMPUTE_FEE = "free_compute_fee";  //自由转算力手续费
        public static final String COMPUTE_FREE_FEE = "compute_free_fee"; // 算力转自由手续费
        public static final String AWARD_PERCENT = "award_percent";  //奖金比例配置
        public static final String STATIC_LIMIT = "static_limit";  // 智能算力奖金可提比例
        public static final String TRANSFER_LEFT = "transfer_left";  // 算力转账剩余金额（不能转空）
        public static final String TRANSFER_MIN = "transfer_min";  // 最小转账金额
        public static final String USD_TO_CNY = "usd_to_cny";  // 美元对人民币比例
        public static final String ACCOUNT_LOCK_RELEASE_TIMES = "account_lock_release_times";  // 锁定账户释放次数
        public static final String LANTAI_EXCHANGE_STATUS = "lantai_exchange_status";  // 蓝太账户迁移开关
        public static final String LOCK_ACCOUNT_RELEASE_STATUS = "lock_account_release_status";  // 锁定账户释放开关
        public static final String TRANSFER_LEFT_FREE = "transfer_left_free";  //自由转账剩余金额（不能转空）
        public static final String TRANSFER_LEFT_FREE_TO_COMPUTE = "transfer_left_free_to_compute";  //自由转账剩余金额（不能转空）
        public static final String TRANSFER_STATUS = "transfer_status";  //转账限制开关（0：允许普通会员互转 1：不允许普通会员互转）

        //-------------- org ----------------------------------
        public static final String ORG_SELL_PAY_FEE_RATE = "org_sell_pay_fee_rate";  //交易卖出机构支付手续费比率
        public static final String ORG_VIP_NO = "org_vip_no";  //机构对应会员编号

        public static final String ORG_ENABLE_WEEKEND_TRADE = "ENABLE_WEEKEND_TRADE";  //交易大盘是否允许周末开启 0 禁止 1 允许
        public static final String ORG_START_TRADE_TIME = "START_TRADE_TIME";  //交易大盘开始时间
        public static final String ORG_END_TRADE_TIME = "END_TRADE_TIME";  //交易大盘结束时间
        public static final String ORG_TRADED_REWARD_RATIO = "TRADED_REWARD_RATIO";  //交易成功给买家奖励比例
        public static final String ORG_SELL_ROBBING_SINGLE_MAX_TR = "ORG_SELL_ROBBING_SINGLE_MAX_TR";  //抢单卖家最大交易数量
        public static final String SELL_ROBBING_SINGLE_MIN_TRADE_ = "SELL_ROBBING_SINGLE_MIN_TRADE_";  //抢单卖家最小交易数量
        public static final String BUY_ROBBING_SINGLE_MAX_TRADE_N = "BUY_ROBBING_SINGLE_MAX_TRADE_N";  //抢单买家最大交易数量
        public static final String BUY_ROBBING_SINGLE_MIN_TRADE_N = "BUY_ROBBING_SINGLE_MIN_TRADE_N";  //抢单买家最小交易数量
        public static final String SELL_ENTRUST_SINGLE_MAX_TRADE_ = "SELL_ENTRUST_SINGLE_MAX_TRADE_";  //挂单卖家最大交易数量
        public static final String SELL_ENTRUST_SINGLE_MIN_TRADE_ = "SELL_ENTRUST_SINGLE_MIN_TRADE_";  //挂单卖家最小交易数量
        public static final String BUY_ENTRUST_SINGLE_MAX_TRADE_N = "BUY_ENTRUST_SINGLE_MAX_TRADE_N";  //挂单买家最大交易数量
        public static final String BUY_ENTRUST_SINGLE_MIN_TRADE_N = "BUY_ENTRUST_SINGLE_MIN_TRADE_N";  //挂单买家最小交易数量

        public static final String ORG_CURRDAY_MAX_SELL_NUM = "CURRDAY_MAX_SELL_NUM";  //当日最大卖量
        public static final String ORG_CURRDAY_MAX_SELL_TIMES = "CURRDAY_MAX_SELL_TIMES";  //当天最大卖出次数
        public static final String USER_SELL_PAY_FEE_RATE = "USER_SELL_PAY_FEE_RATE";  //交易卖出用户支付手续费比率

    }

    public class AccountStatus {
        public static final String FROZEN = "frozen"; //冻结
        public static final String USED = "used"; // 启用
    }

    public class NumberUtils {
        /**
         * 保留六位小数
         */
        public static final String ZERO = "0.000000";
    }


    /**
     * 时间格式
     *
     * @author hp
     */
    public static class DateFormat {
        public static final String DatetimeFormat = "DATETIME";
        public static final String SlashYmdHmsFormat = "yyyy/MM/dd HH:mm:ss";
        public static final String YmdHHmmFormat = "yyyy-MM-dd HH:mm";
        public static final String SimpleYmdFormatChinese = "yyyy年MM月dd日";
        public static final String SimpleYmdFormat = "yyyy-MM-dd";
        public static final String DatetimesFormat = "yyyyMMddHHmmss";
        public static final String DatetimesFormatMilliSecond = "yyyyMMddHHmmssSSS";
    }


    /**
     * 业务缩写，用于生成单号
     *
     * @author hp
     */
    public static class BizTypeCode {
        public static final String AWARD = "AW";
        public static final String TRANSFER = "ETH";
        //		public static final String WITHDRAWDEPOSIT= "TX"; //可提限额标识
        public static final String RELEASE_LOCK_ACCOUNT = "SF"; //锁定额度释放
        public static final String compulsoryWithdrawal = "QZ"; //强制提币标识
        public static final String PRIVATE_RELEASE = "PR"; //私募释放

        public static final String TRADE_QR_PAY = "QP";//支付訂單號
    }

    /**
     * 交易类型代号
     *
     * @author hp
     */
    public static class TransTypeCode {
        public static final String SUBSCRIBE = "subscribe"; //认购
        //		public static final String STATIC_BONUS = "staticBonus"; //智能合约购
//		public static final String DYNAMIC_BONUS = "dynamicBonus"; //挖矿算力收益  
        public static final String TRANSFER_OUT = "transferOut"; //转账-转出
        public static final String TRANSFER_IN = "transferIn"; //转账-转入
        public static final String COMPUTE_TRANSFER_OUT = "computeTransferOut"; //算力转账-转出
        public static final String QZ_COMPUTE_TRANSFER_OUT_TYPE = "qzcomputeTransferOutType"; //算力转账-转出
        public static final String COMPUTE_TRANSFER_IN = "computeTransferIn"; //算力转账-转入
        public static final String FREE_TRANSFER_OUT = "freeTransferOut"; //自由转账-转出
        public static final String FREE_TRANSFER_IN = "freeTransferIn"; //自由转账-转入
        public static final String TRADE_IN = "tradeIn"; //交易收入
        public static final String TRADE_OUT = "tradeOut"; //交易支出
        public static final String RELEASE = "release"; //释放
        public static final String COMMISSION_ORDER = "commissionOrder"; //委单
        public static final String TRADE_CANCLE = "tradeCancle"; //交易撤销
        public static final String STAITC_AWARD = "staitcAward"; //智能算力奖金
        public static final String DYNAMIC_AWARD = "dynamicAward";
        //		public static final String CTF_AWARD = "ctfAward"; //算力
        public static final String DYNAMIC_TO_FREE = "dynamicToFree"; //分享算力奖金转自由钱包
        public static final String DYNAMIC_STATIC_TO_FREE = "dynamicStaticToFree"; //分享算力智能算力奖金转自由钱包
        public static final String COMPUTE_DYNAMIC_STATIC_TO_FREE = "computeDynamicStaticToFree"; //算力分享算力智能算力奖金转自由钱包
        //		public static final String WITHDRAW_DEPOSIT = "withdrawDeposit"; //提币扣除的奖金数
        public static final String STAITC_DEPOSIT = "staitcDeposit";  //提币扣除的智能算力奖金数
        public static final String TRADE_REWARD_IN = "tradeRewardIn"; //交易奖励收入
        public static final String TRADEE_REWARD_OUT = "tradeRewardOut"; //交易奖励支出
        public static final String RELEASE_LOCK_ACCOUNT = "releaseLockAccount"; // 释放锁定账户
        public static final String QZ_COMPUTE_TRANSFER_OUT = "qzcomputeTransferout"; //强制算力提币
        public static final String QZ_COMPUTE_TRANSFER_OUT_FREE = "qzcomputeTransferoutfree"; //强制算力提币手续费
        public static final String PRIVATE_RELEASE = "privateRelease"; // 私募释放
        public static final String ACCOUNT_ADJUSTMENT_IN = "accountAdjustmentIn"; // 调账-增加
        public static final String ACCOUNT_ADJUSTMENT_OUT = "accountAdjustmentOut"; // 调账-减少
        public static final String BOUNS_COMPUTE = "bounsCompute"; //奖金算力可提
        public static final String ORG_FEE = "orgFee"; //机构手续费


        /**
         * ---------------------------------------------  转账 --------------------------------------
         **/
        public static final String FREE_TRANSFER_FREE_OUT = "freeTofreeOut"; //自由转自由-转出
        public static final String FREE_TRANSFER_FREE_IN = "freeTofreeIn"; //自由转自由-转入
        public static final String COMPUTE_TRANSFER_COMPUTE_OUT = "computeTocomputeOut"; //算力转算力-转出
        public static final String COMPUTE_TRANSFER_COMPUTE_IN = "computeTocomputeIn"; //算力转算力-转入
        public static final String FREE_TRANSFER_COMPUTE_OUT = "freeTocomputeOut"; //自由转算力-转出
        public static final String FREE_TRANSFER_COMPUTE_IN = "freeTocomputeIn"; //自由转算力-转入

        public static final String COMPUTE_TRANSFER_FREE_OUT = "computeTofreeOut"; // 提币算力转自由-转出
        public static final String COMPUTE_TRANSFER_FREE_IN = "computeTofreeIn"; // 提币算力转自由-转入
        public static final String STATIC_TRANSFER_FREE_OUT = "staticTofreeOut"; // 提币合约转自由-转出
        public static final String STATIC_TRANSFER_FREE_IN = "staticTofreeIn"; // 提币合约转自由-转入
        public static final String DYNAMIC_TRANSFER_FREE_OUT = "dynamicTofreeOut"; // 提币分享转自由-转出
        public static final String DYNAMIC_TRANSFER_FREE_IN = "dynamicTofreeIn"; // 提币分享转自由-转入


        /**
         * --------------------------------------------- 娱乐版块的充值与提币 --------------------------------------
         **/
        public static final String TRADE_TRANSFER_PLATFORM_IN = "tradeTransferPlatfromIn"; //娱乐场收入
        public static final String TRADE_TRANSFER_PLATFORM_OUT = "tradeTransferPlatfromOut"; //娱乐场支出


        /**
         * --------------------------------------------- 扫码支付 --------------------------------------
         **/
        public static final String TRADE_QR_PAY_IN = "tradeQRPayIn"; // 扫码支付收入
        public static final String TRADE_QR_PAY_OUT = "tradeQRPayOut"; // 扫码支付支出

        /**
         * ---------------------------------------------商户结算 --------------------------------------
         **/
        public static final String MERCHANT_SETTLE_FREE_ACCOUNTS = "merchantSettleFreeAccounts"; // 商户自由账户结算
        public static final String MERCHANT_SETTLE_FREE_ACCOUNTS_FEE = "merchantSettleFreeAccountsFee"; // 商户自由账户结算手续费
        public static final String MERCHANT_SETTLE_COMPUTE_ACCOUNTS = "merchantSettleComputeAccounts"; // 商户算力账户结算
        public static final String MERCHANT_SETTLE_COMPUTE_ACCOUNTS_FEE = "merchantSettleComputeAccountsFee"; // 商户算力账户结算手续费

    }


    /**
     * 交易类型名称
     *
     * @author hp
     */
    public static class TransTypeName {
        public static final String SUBSCRIBE = "认购 ";
        public static final String STATIC_BONUS = "智能合约购 ";
        public static final String DYNAMIC_BONUS = "挖矿算力收益 ";
        public static final String TRANSFER_OUT = "转账-转出";
        public static final String COMPUTE_TRANSFER_OUT = "算力转账-转出";
        public static final String QZ_COMPUTE_TRANSFER_OUT_TYPE = "强制算力转账-转出";
        public static final String COMPUTE_TRANSFER_IN = "算力转账-转入 ";
        public static final String FREE_TRANSFER_OUT = "自由转账-转出";
        public static final String FREE_TRANSFER_IN = "自由转账-转入";
        public static final String TRANSFER_IN = "转账-转入";
        public static final String TRADE_IN = "交易收入";
        public static final String TRADE_OUT = "交易支出";
        public static final String RELEASE = "释放";
        public static final String COMMISSION_ORDER = "委单";
        public static final String TRADE_CANCLE = "交易撤销";
        public static final String STAITC_AWARD = "智能算力奖金";
        public static final String DYNAMIC_AWARD = "分享算力奖金";
        public static final String SECTION_STAITC_AWARD = "部分智能算力奖金";
        //		public static final String CTF_AWARD = "算力余额";
        public static final String DYNAMIC_TO_FREE = "分享算力转自由钱包";
        public static final String DYNAMIC_STATIC_TO_FREE = "分享、智能算力转自由钱包";
        public static final String COMPUTE_DYNAMIC_STATIC_TO_FREE = "算力、分享、智能转自由钱包";
        public static final String WITHDRAW_DEPOSIT = "提币扣除的分享算力奖金数";
        public static final String STAITC_DEPOSIT = "提币扣除的智能算力奖金数";
        public static final String TRADE_REWARD_IN = "交易奖励收入"; //
        public static final String TRADEE_REWARD_OUT = "交易奖励支出"; //
        public static final String RELEASE_LOCK_ACCOUNT = "释放锁定账户"; //
        public static final String QZ_COMPUTE_TRANSFER_OUT = "强制算力提币";
        public static final String QZ_COMPUTE_TRANSFER_OUT_FREE = "强制算力提币手续费";
        public static final String PRIVATE_RELEASE = "私募释放"; // 私募释放
        public static final String ACCOUNT_ADJUSTMENT_IN = "调账-增加"; // 调账-增加
        public static final String ACCOUNT_ADJUSTMENT_OUT = "调账-减少"; // 调账-减少
        public static final String BOUNS_COMPUTE = "奖金算力可提"; //奖金算力可提
        public static final String ORG_FEE = "机构手续费"; //机构手续费

        /**
         * ---------------------------------------------  转账 --------------------------------------
         **/
        public static final String FREE_TRANSFER_FREE_OUT = "自由互转转出"; //自由转自由-转出
        public static final String FREE_TRANSFER_FREE_IN = "自由互转转入"; //自由转自由-转入
        public static final String COMPUTE_TRANSFER_COMPUTE_OUT = "算力互转转出"; //算力转算力-转出
        public static final String COMPUTE_TRANSFER_COMPUTE_IN = "算力互转转入"; //算力转算力-转入
        public static final String FREE_TRANSFER_COMPUTE_OUT = "自由划转算力转出"; //自由转算力-转出
        public static final String FREE_TRANSFER_COMPUTE_IN = "自由划转算力转入"; //自由转算力-转入


        public static final String COMPUTE_TRANSFER_FREE_OUT = "提币算力转自由-转出"; // 提币算力转自由-转出
        public static final String COMPUTE_TRANSFER_FREE_IN = "提币算力转自由-转入"; // 提币算力转自由-转入
        public static final String STATIC_TRANSFER_FREE_OUT = "提币智能转自由-转出"; // 提币合约转自由-转出
        public static final String STATIC_TRANSFER_FREE_IN = "提币智能转自由-转入"; // 提币合约转自由-转入
        public static final String DYNAMIC_TRANSFER_FREE_OUT = "提币分享转自由-转出"; // 提币分享转自由-转出
        public static final String DYNAMIC_TRANSFER_FREE_IN = "提币分享转自由-转入"; // 提币分享转自由-转入


        /**
         * --------------------------------------------- 娱乐版块的充值与提币 --------------------------------------
         **/
        public static final String TRADE_TRANSFER_PLATFORM_IN = "娱乐场-收入"; //娱乐场收入
        public static final String TRADE_TRANSFER_PLATFORM_OUT = "娱乐场-支出"; //娱乐场支出

        /**
         * --------------------------------------------- 扫码支付 --------------------------------------
         **/
        public static final String TRADE_QR_PAY_IN = "扫码支付收入"; // 扫码支付收入
        public static final String TRADE_QR_PAY_OUT = "扫码支付支出"; // 扫码支付支出

        /**
         * ---------------------------------------------商户结算 --------------------------------------
         **/
        public static final String MERCHANT_SETTLE_FREE_ACCOUNTS = "商户自由账户结算"; // 商户自由账户结算
        public static final String MERCHANT_SETTLE_FREE_ACCOUNTS_FEE = "商户自由账户结算手续费"; // 商户自由账户结算手续费
        public static final String MERCHANT_SETTLE_COMPUTE_ACCOUNTS = "商户算力账户结算"; // 商户算力账户结算
        public static final String MERCHANT_SETTLE_COMPUTE_ACCOUNTS_FEE = "商户算力账户结算手续费"; // 商户算力账户结算手续费
    }


    /**
     * 收支类别 0-收入 1-支出
     *
     * @author hp
     */
    public static class PayTypeCode {
        public static final String IN = "in";
        public static final String OUT = "out";
    }


    /**
     * 变化类别  算力转账  蓝太释放 私募释放
     *
     * @author hp
     */
    public static class PRIVATE_ACCOUNT_CHANGE_TYPE {
        public static final String COMPUTE_TRANSFER = "computeTransfer";
        public static final String LANTAI_RELEASE = "lantaiRelease";
        public static final String PRIVATE_RELEASE = "privateRelease";
        public static final String PLATFORM_COMPUTE_TRANSFER = "platformComputeTransfer";// 平台转账，娱乐版块
        public static final String QZ_COMPUTE_TRANSFER = "qzComputeTransfer"; //强制提币标识
        public static final String TRADE_QR_PAY_COMPUTE = "tradeQRPayCompute";// 扫码支付，算力钱包
    }


    /**
     * 账户余额加密
     */
    public static class SaltCode {
        public static final String ACCOUNT_SALT = "ACCOUT&AMOUNT"; // 前缀
        public static final int ACCOUNT_HASH_ITERATIONS = 666666; // 后缀
    }

    /**
     * 状态enable 有效 disable 无效
     */
    public static class VaildStatus {
        public static final String ENABLE = "enable"; //有效
        public static final String DISABLE = "disable";    //无效
    }

    /**
     * 状态enable 有效 disable 无效
     */
    public static class ExamineStatus {
        public static final String EXAMINED = "1"; //已审核
        public static final String UNAUDITED = "0";    //未审核
    }


    /**
     * 图片上传路径类型
     */
    public static class UploadPathType {
        public static final String QCCode = "qcCode"; //二维码路径
        public static final String NEWS = "news"; //新闻
        public static final String NOTICE = "notice"; //公告
    }


    /**
     * 图片上传路径类型名称
     */
    public static class UploadPathTypeName {
        public static final String NEWS = "新闻"; //新闻
        public static final String NOTICE = "公告"; //公告
    }

    /**
     * 新闻发布状态(0-下架，1-发布)
     */
    public static class NewsStatus {
        public static final String CLOSE = "0";
        public static final String OPEN = "1";
    }

    /**
     * 新闻发布状态名称(0-下架，1-发布)
     */
    public static class NewsStatusName {
        public static final String CLOSE = "下架";
        public static final String OPEN = "发布";
    }


    /**
     * 锁定账户释放状态
     */
    public static class LOCK_ACCOUNT_RELEASE_STATUS {
        public static final String CLOSE = "0";
        public static final String OPEN = "1";
    }

    /**
     * 锁定账户释放状态
     */
    public static class LANTAI_EXCHANGE_STATUS {
        public static final String CLOSE = "0";
        public static final String OPEN = "1";
    }

    /**
     * 私募释放状态
     */
    public static class PRIVATE_RELEASE_STATUS {
        public static final String CLOSE = "0";
        public static final String OPEN = "1";
    }

    /**
     * 参数名称
     */
    public static class ParameterName {
        public static final String PRIVATE_RELEASE_RATE = "private_release_rate";  // 私募释放比率
        public static final String PRIVATE_RELEASE_STATUS = "private_release_status"; //私募释放开关
    }
}
